package org.dromara.nursing.domain.bo;

import org.dromara.nursing.domain.MsAiChat;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * AI聊天业务对象 ms_ai_chat
 *
 * @author Lion Li
 * @date 2025-04-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MsAiChat.class, reverseConvertGenerate = false)
public class MsAiChatBo extends BaseEntity {

    /**
     * 聊天ID
     */
    @NotNull(message = "聊天ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 用户名称
     */
    private String userName;

    /**
     * 会话ID
     */
    private String sessionId;

    /**
     * 用户问题
     */
    @NotBlank(message = "用户问题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String query;

    /**
     * AI回答
     */
    private String response;

    /**
     * 提问时间
     */
    private Date queryTime;

    /**
     * 回答时间
     */
    private Date responseTime;

    /**
     * 响应时长(毫秒)
     */
    private Long duration;

    /**
     * 使用模型
     */
    private String model;

    /**
     * IP地址
     */
    private String ipAddress;

    /**
     * 设备信息
     */
    private String deviceInfo;

    /**
     * 错误信息
     */
    private String errorMsg;

    /**
     * 备注
     */
    private String remarks;


}
